from flask_restplus import Api as OrigApi

class Api(OrigApi):

    def __init__(self, app=None, close_match_enabled=True, *args, **kwargs):
        self.close_match_enabled = close_match_enabled
        self.app = app
        super(Api, self).__init__(*args, **kwargs)

    def help_on_404(self, message=None):
        if self.close_match_enabled:
            message = super(Api, self).help_on_404(message)
        return message
